home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Apple II Sample Code / MPW IIGS SC / SC.016.Aware / aware.r < prev    next >
Encoding:
Text File  |  1990-06-24  |  5.7 KB  |  351 lines  |  [TEXT/MPS ]

  1. /*
  2.     Aware.r -- Version 3.0
  3.     
  4.     Developer Technical Support Apple II Sample Code
  5.     
  6.     Copyright (c) 1990 by Apple Computer, Inc.
  7.     All Rights Reserved.
  8.  
  9.     This file contains the definitions of the resources used by the
  10.     network aware sample application.  Since this program runs
  11.     under System Software 5.0, it makes heavy use of resources.
  12.     
  13.     Note that the use of resources makes it easy to change things
  14.     such as menu titles and item names without having to change
  15.     the program at all.
  16. */
  17.  
  18.  
  19. /* Include the definition of standard Apple IIGS resource types */
  20. /* {RIIGSIncludes}TypesIIGS.r */ 
  21. #include "TypesIIGS.r" 
  22.  
  23.  
  24.  
  25. /*
  26.     Define the contents of the About box.  Remember, it is a string
  27.     passed to AlertWindow
  28. */
  29. resource rAlertString (1) {
  30.  "0\$19\$00\$A0\$00\$AA\$00\$E0\$01"        /* Custom window (19,160,170,480) */
  31.  "\$00@"                                    /* No icon, "@" is separator */
  32.  TBCenterJust
  33.  TBForeColor TBColor1                        /* draw title in red */
  34.  "Aware 3.0"
  35.  TBForeColor TBColor0                        /* back to black */
  36.  TBEndOfLine
  37.  TBEndOfLine
  38.  "A sample program to demonstrate network awareness."
  39.  TBEndOfLine
  40.  TBEndOfLine
  41.  "by"
  42.  TBEndOfLine
  43.  "Mark Day"
  44.  TBEndOfLine
  45.  TBEndOfLine
  46.  "Copyright Apple Computer, Inc."
  47.  TBEndOfLine
  48.  "All Rights Reserved"
  49.  TBEndOfLine
  50.  TBEndOfLine
  51.  "Last run: *0"                                /* *0 will substitute a string */
  52.  "@^#6\$00"                                    /* end text, default button:"Continue" */
  53. };
  54.  
  55.  
  56.  
  57. /*
  58.     Dialog box when unable to saveConfig.
  59. */
  60. resource rAlertString (2) {
  61.  "5"                                        /* a standard window size */
  62.  "4@"                                        /* caution icon, start text */
  63.  TBEndOfLine
  64.  "Error saving configuration"
  65.  "@^#0\$00"                                    /* default button: OK */
  66. };
  67.  
  68.  
  69. /*
  70.     Record used by StartUpTools to determine which tools to start up.
  71. */
  72. resource rToolStartup (1) {
  73.  mode640, /* master SCB */
  74.  { 
  75.         3,$0300,  /* misc tools */
  76.         4,$0301,  /* quickdraw */
  77.         5,$0302,  /* desk manager */
  78.         6,$0300,  /* eventMgr */
  79. /*      7,$0200,  /* scheduler */
  80. /*      8,$0301,  /* sound tools */
  81. /*      9,$0201,  /* ADB tools */
  82. /*      10,$0202, /* SANE */
  83.         11,$0200, /* int math */
  84.         14,$0301, /* Window Manager */
  85.         15,$0301, /* Menu Manager */
  86.         16,$0301, /* Control Manager */
  87.         18,$0301, /* QD Aux */
  88.         19,$0300, /* print manager */
  89.         20,$0301, /* LineEdit tool set */
  90.         21,$0302, /* Dialog Manager */
  91.         22,$0300, /* Scrap manager */
  92.         23,$0301, /* standard file */
  93. /*      25,$0104, /* NoteSynth */
  94. /*      26,$0104, /* Note Seq */
  95.         27,$0301, /* Font manager */
  96.         28,$0301, /* list manager */
  97. /*      29,$0101, /* ACE */
  98. /*      32,$0103, /* Midi Tools */
  99.         34,$0101  /* text edit */
  100.  }
  101. };
  102.  
  103.  
  104.  
  105. /*
  106.     Menu definitions
  107. */
  108. #define AppleMenuID $901
  109. #define FileMenuID $902
  110. #define EditMenuID $903
  111.  
  112. #define UndoID 250
  113. #define CutID 251
  114. #define CopyID 252
  115. #define PasteID 253
  116. #define ClearID 254
  117. #define CloseID 255
  118. #define AboutID 301
  119. #define QuitID 302
  120. #define LoadConfigID 303
  121. #define SaveConfigID 304
  122. #define DividerID 399                        /* dimmed dividing line */
  123.  
  124.  
  125.  
  126. /*
  127.     Define the menus in the system menu bar.
  128. */
  129. resource rMenuBar (1) {
  130.  {
  131.     AppleMenuID,
  132.     FileMenuID,
  133.     EditMenuID
  134.  };
  135. };
  136.  
  137. /*
  138.     Define the contents of the Apple menu.
  139. */
  140. resource rMenu (AppleMenuID) {
  141.  AppleMenuID,
  142.  0xA000 + rmAllowCache,
  143.  AppleMenuID,
  144.  {
  145.     AboutID,
  146.     DividerID
  147.     /* NDAs go here */
  148.  };
  149. };
  150.  
  151. /*
  152.     Define the File menu
  153. */
  154. resource rMenu (FileMenuID) {
  155.  FileMenuID,
  156.  0xA000 + rmAllowCache,
  157.  FileMenuID,
  158.  {
  159.     LoadConfigID,
  160.     SaveConfigID,
  161.     CloseID,
  162.     DividerID,
  163.     QuitID 
  164.  };
  165. };
  166.  
  167. /*
  168.     Define the Edit menu
  169. */
  170. resource rMenu (EditMenuID) {
  171.  EditMenuID,
  172.  0xA000 + rmDisabled+rmAllowCache,
  173.  EditMenuID,
  174.  { 
  175.     UndoID,
  176.     DividerID,
  177.     CutID,
  178.     CopyID,
  179.     PasteID,
  180.     ClearID
  181.  };
  182. };
  183.  
  184. /*
  185.     Define the dimmed divider item used in all the menus
  186. */
  187. resource rMenuItem (DividerID) {
  188.  DividerID,
  189.  "","",
  190.  0,
  191.  RefIsResource*ItemTitleRefShift+rMIDisabled,
  192.  DividerID
  193. };
  194.  
  195. /*
  196.     Undo menu item
  197. */
  198. resource rMenuItem (UndoID) {
  199.  UndoID,
  200.  "Z","z",
  201.  0,
  202.  RefIsResource*ItemTitleRefShift,
  203.  UndoID
  204. };
  205.  
  206. /*
  207.     Cut menu item
  208. */
  209. resource rMenuItem (CutID) {
  210.  CutID,
  211.  "X","x",
  212.  0,
  213.  RefIsResource*ItemTitleRefShift,
  214.  CutID
  215. };
  216.  
  217. /*
  218.     Copy menu item
  219. */
  220. resource rMenuItem (CopyID) {
  221.  CopyID,
  222.  "C","c",
  223.  0,
  224.  RefIsResource*ItemTitleRefShift,
  225.  CopyID
  226. };
  227.  
  228. /*
  229.     Paste menu item
  230. */
  231. resource rMenuItem (PasteID) {
  232.  PasteID,
  233.  "V","v",
  234.  0,
  235.  RefIsResource*ItemTitleRefShift,
  236.  PasteID
  237. };
  238.  
  239. /*
  240.     Clear menu item
  241. */
  242. resource rMenuItem (ClearID) {
  243.  ClearID,
  244.  "","",
  245.  0,
  246.  RefIsResource*ItemTitleRefShift,
  247.  ClearID
  248. };
  249.  
  250. /*
  251.     Close menu item
  252. */
  253. resource rMenuItem (CloseID) {
  254.  CloseID,
  255.  "","",
  256.  0,
  257.  RefIsResource*ItemTitleRefShift,
  258.  CloseID
  259. };
  260.  
  261. /*
  262.     "About Aware..." menu item
  263. */
  264. resource rMenuItem (AboutID) {
  265.  AboutID,
  266.  "","",
  267.  0,
  268.  RefIsResource*ItemTitleRefShift,
  269.  AboutID
  270. };
  271.  
  272. /*
  273.     Quit menu item
  274. */
  275. resource rMenuItem (QuitID) {
  276.  QuitID,
  277.  "Q","q",
  278.  0,
  279.  RefIsResource*ItemTitleRefShift,
  280.  QuitID
  281. };
  282.  
  283. /*
  284.     "Load Configuration" menu item
  285. */
  286. resource rMenuItem (LoadConfigID) {
  287.  LoadConfigID,
  288.  "L","l",
  289.  0,
  290.  RefIsResource*ItemTitleRefShift,
  291.  LoadConfigID
  292. };
  293.  
  294. /*
  295.     "Save Configuration" menu item
  296. */
  297. resource rMenuItem (SaveConfigID) {
  298.  SaveConfigID,
  299.  "S","s",
  300.  0,
  301.  RefIsResource*ItemTitleRefShift,
  302.  SaveConfigID
  303. };
  304.  
  305. /*
  306.     Strings for menu titles and menu items
  307. */
  308. resource rPString (AppleMenuID) {
  309.  "@"
  310.  };
  311. resource rPString (FileMenuID) {
  312.  "  File  "
  313.  };
  314. resource rPString (EditMenuID) {
  315.  "  Edit  "
  316.  };
  317.  
  318. resource rPString (DividerID) {
  319.  "-"
  320.  };
  321. resource rPString (AboutID) {
  322.  "About Aware..."
  323.  };
  324. resource rPString (QuitID) {
  325.  "Quit"
  326.  };
  327. resource rPString (LoadConfigID) {
  328.  "Load Configuration"
  329.  };
  330. resource rPString (SaveConfigID) {
  331.  "Save Configuration"
  332.  };
  333. resource rPString (UndoID) {
  334.  "Undo"
  335.  };
  336. resource rPString (CutID) {
  337.  "Cut"
  338.  };
  339. resource rPString (CopyID) {
  340.  "Copy"
  341.  };
  342. resource rPString (PasteID) {
  343.  "Paste"
  344.  };
  345. resource rPString (ClearID) {
  346.  "Clear"
  347.  };
  348. resource rPString (CloseID) {
  349.  "Close"
  350.  };
  351.